function HttpUtil(){
	//获取当前网址
	this.curWwwPath=window.document.location.href;
	this.pathName=window.document.location.pathname;
	this.pos=this.curWwwPath.indexOf(this.pathName);
	this.localhostPath=this.curWwwPath.substring(0,this.pos);
	this.projectName=this.pathName.substring(0,this.pathName.substr(1).indexOf('/')+1);
	this.basePath = this.localhostPath + this.projectName + "/";
}

HttpUtil.prototype.getParameter = function(name){
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) return unescape(r[2]); return null;
}

var httpUtil = new HttpUtil();



